package lab02.test06;

/**
 * Created by mac on 2017/10/15.
 */
public class Triangle {

    //属性：三个边，以及周长、面积，能否构成三角形

    //行为：返回周长、面积以及修改三个边

    public double a;
    public double b;
    public double c;
    public double Length;
    public double Arae;
    public double getLength() {
        return a+b+c;
    }

    public double getArea() {
        double p=(a+b+c)/2;
        return Math.sqrt(p*(p-a)*(p-b)*(p-c));
    }

    Boolean judge() {
        if(a+b>=c||a+c>=b||b+c>=a)
            return false;
        else
            return true;
    }

    void modifA(double A) {
        a=A;
    }
    void modifB(double B) {
        b=B;
    }
    void modifC(double C) {
        c=C;
    }
    public Triangle(double a, double b, double c) {
        this.a = a;
        this.b = b;
        this.c = c;
    }


}
